package cn.cdiothree.service;

import cn.cdiothree.dataobject.OrderRating;
import cn.cdiothree.vo.ResultVo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * 订单评论服务接口
 * @author cumthing
 */
public interface OrderRatingService extends IService<OrderRating> {
    /**
     * 添加评分
     * @param orderId
     * @param userId
     * @param ratingExpress
     * @param ratingQuality
     * @param ratingService
     * @return
     */
    ResultVo addRating(String orderId, Integer userId, Integer ratingExpress, Integer ratingQuality, Integer ratingService);

    /**
     * 根据订单号和用户id查询评分
     * @param orderId
     * @param userId
     * @return
     */
    OrderRating selectByOrderIdAndUserId(String orderId, Integer userId);
}
